After finishing your model, you can save table structures and relations from the model into a script file. The Export SQL feature generates a SQL file for the script. To start the Export SQL feature, choose File -> Export SQL from the menu bar.
Export to File
Set the output file name and location.
Select objects to export
Choose objects in the model you wish to export.
Note: The following options depend on the diagram database type you are chosen and sort in ascending order.
Default Schema Name
Set the schema name for the objects without schema settings.
Drop with CASCADE
Include drop object SQL statements with cascade option in file with this option in on.
Include auto increment
Include table auto increment in file with this option is on.
Include character set
Include table and field character set in file with this option is on.
Include checks
Include checks in file with this option is on.
Include collation
Include table collation in file with this option is on.
Include Drop SQL
Include drop object SQL statements in file with this option in on.
Include excludes
Include excludes in file with this option is on.
Include foreign keys
Include foreign keys in file with this option is on.
Include indexes
Include indexes in file with this option is on.
Include primary keys
Include primary keys in file with this option is on.
Include rules
Include rules in file with this option is on.
Include schema name
Include the schema name in file with this option is on. Otherwise, only object names are included in SQL statements.
Include triggers
Include triggers in file with this option is on.
Include uniques
Include uniques in file with this option is on.
Server Edition / Server Version
Select the server edition or version for the SQL file.